﻿
using Xacml.Core;
using System.Xml;

namespace Xacml.Core.Policy
{
  public class EnvironmentElementReadWrite : TargetItemBaseReadWrite
  {
    public override bool IsReadOnly
    {
      get
      {
        return false;
      }
    }

    public EnvironmentElementReadWrite(TargetMatchCollectionReadWrite match, XacmlVersion version)
      : base(match, version)
    {
    }

    public EnvironmentElementReadWrite(XmlReader reader, XacmlVersion version)
      : base(reader, "Environment", "EnvironmentMatch", version)
    {
    }

    protected override TargetMatchBaseReadWrite CreateMatch(XmlReader reader)
    {
      return (TargetMatchBaseReadWrite) new EnvironmentMatchElementReadWrite(reader, this.SchemaVersion);
    }
  }
}
